#ifndef INVOICEMODELDELEGATE_H
#define INVOICEMODELDELEGATE_H

#include <QItemDelegate>

namespace ecocity
{

class InvoiceModelDelegate : public QItemDelegate
{
    Q_OBJECT

public:

    InvoiceModelDelegate( QObject *parent = 0 );

private:

    void paint( QPainter *painter, const QStyleOptionViewItem& option,
                const QModelIndex& index ) const;

    QWidget* createEditor( QWidget *parent, const QStyleOptionViewItem &option,
                           const QModelIndex &index) const;

    void setEditorData( QWidget *editor, const QModelIndex &index ) const;
    void setModelData( QWidget *editor, QAbstractItemModel *model,
                       const QModelIndex &index) const;
private slots:

    void commitAndCloseEditor( );
};

}      // namespace ecocity


#endif // INVOICEMODELDELEGATE_H
